home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
misc
/
hcmenu.lha
/
HCMenu
/
Doc
/
English
/
HCMenu.Doc
next >
Wrap
Text File
|
1997-10-14
|
15KB
|
368 lines
Subject: Haute-Cuisine Menu V1.8
Author: E. Th. van den Oosterkamp.
AssembleDate: 10-Apr-95
SystemDemands: None. The HCMenu supports all KickStart versions.
Introduction.
=============
The HCMenu is an interactive menusystem, which is primary meant for exe-
cuting software in a quick and easy way. Personally, I use this menu from
October 1992 and is now a lot better compared to V1.0 (...ahem...).
This menu is coded since I can't stand WorkBench. Although the WB is a
lot better compared to my V1.3 WB in 1992, I personally find a menu
to be much handier.
Now I know people using a keymap (Youknow: F1 for ASM-One, F2 for DPaint
etc. ), but that reminds me of a PC, and an Amiga should do much better.
Nowadays, this menu is designed for using on a KS2.0 machine or higher.
Although it will run perfectly on a KS1.3 machine, but some functions
will be disabled. The support of the older kickstarts is done for users
who want to install the HCMenu on a floppy. When this floppy is used on
an old system it will work (the HCMenu on it I mean..)
Description.
============
The HCMenu uses a so-called "menufile". This is not more or less as a
normal textfile inwhich the name and functions of the items are found.
It is possible to use SubMenu's, where the HCMenu provides the
flexibility to enable the user to define the structure of the total
menu -and submenu system.
All settings may be stored as a snapshot. Information like coordinates,
sizes, colors are written in a binary file.
The MenuFile.
=============
The menu was primary written for a simple person (me) and therefor the
menufile is kept simple. The simplicity of the menufile decreases the
size needed to tell the menu what the wishes are, but testing for errors
is very difficult for the menu.
Just to say it in one breath: The first in the menufile are the names
(following one every line) of all items in the same order as they
should appear in the menu. The HCMenu will center the names and show
them in the items.
The line with the last itemname is followed by a line with ONLY a
percent sign on it (%). When the HCMenu finds this line, it assumes
that on the following lines the commands belonging to the items
will appear.
The commands are stored in the same order as the names were. Each line
is dedicated to one item.
A menufile example:
-----------------------------------------------------------------------
ToolMenu
ASM-One
DPaint
DirOpus
GamesMenu
Nothing
MenuEdit
%
@dh1:tools/tool.menu
dh1:assembler/asm-one
cd dh1:iff; run dh1:grafiek/dpaint
dh1:tools/diropus
@dh1:games/games.menu
run ed s:main.menu
-----------------------------------------------------------------------
In the above example some special characters are found (like "@" and the
semicolon). The semicolon acts like a "command-separator". With the use
of the separator, multiple commands may be used on one line. In the
example above this is used to set the currentdirectory to a datadir
before executing the program.
The "@" means that the item is used for a submenu. The submenu sign (@)
MUST be placed as the FIRST character of the line. Following the sign
is the name (and path) of the menufile which contains the menu. For a
submenu command-separators can't be used.
To obtain an "empty spot" instead of an item, just keep the line with
the name for the item blank (See the above example, between the
"DirOpus" -and "GamesMenu" item). For this (invisible) and function-
less item no commands must be specified. This can be seen in the
above example: between the "dh1:tools/diropus" line and the "@dh1:
games/games.menu" line there is no commandline for the invisible item.
Be sure the line containing the itemname is totally empty, and does
not contain any spurious spaces or tabs!
To obtain a item without a function, just keep the commandline empty.
This is shown with the "Nothing" item in the above example.
Some menufile rules:
- Always one thing per line. itemname/SubMenuName+path/commands.
- Don't use spaces before or after an itemname. This will prevent the
HCMenu from centering the name correctly. The HCMenu does NOT check
the size of the name. When the name does not fit in the item, it just
will look ugly.
- SearchPaths, commands and special characters (excluding the semicolon)
MUST start at the first position of the line.
PS: When the creation of a menufile is to difficult, please take a
look at my HCMenuEditor. The HCME is a tool specially made to
make the creation of a menu much easier. The HCMenuEditor does
need, however, a kickstart version 2.0 or higher.
Menu functions.
===============
This may sound odd, but the HCMenu also owns it's menu. In this case
I mean an intuition menubar. Now I will discuss the functions and
items in the menubar, one by one:
The project menu:
- Open Menu - Opens a ReqTools filerequester with which the user may
select a menufile. The menufile will be loaded and the
menu will use the contents...
- Edit Menu - This option will invoke the editor defined in the
prefswindow (as described later). The editor will load
the actual menufile and the user may edit the file.
- NewShell - Opens a shell window.
- Load Snapshot - Loading previously saved settings. There are three pos-
sibillities: "General", "Local" and "Default".
The difference between "General" and "Local" snapshots
is explained in the following section. "Default" will
activate the build-in standard snapshot.
- Save Snapshot - Saving of the actual settings. Now there are only two
possibilities: "General" and "Local". More about this
in the next section.
- About - Information over the program, copyrights and stuff.
- Quit - The HCMenu closes and all memory will be freed. Also
try the closegadget on the window...
The prefs menu:
- NoClick - This function only works with KS2.0 or higher. The
annoying clicking of the diskdrives may be switched off.
- '*'=WildCard - This function also needs KS2.0 or higher. The
wildcards used in all applications are now extended
with the asterisk as used with SM-DOS computers. (Yep
you saw it right: SM-DOS). Now *.info means the same
as #?.info...
- Border - This option determines if there is a 3D-border around
the items or not. Sometimes a border looks real nice,
but sometimes it looks not-so-nice. The "lightsource"
always comes from the upper-left corner, it doesn't
matter how the colors are defined.
- Warnings - Eventual warnings from the HCMenu will be suppressed
when this item is not checkmarked. These warnings
always appear in requesters. An example of a warning
is the "Are you sure?" question when writing the
general snapshot.
- Blanker - Using the build-in ScreenBlanker. The menuBlanker is
described later.
- SelectBar - The selectbar is a bar which is driven by the cursor-
keys. With the <enter> key a menuitem is activated.
The selectbar is influenced by "invisible" items!
- Alt + Esc - Enable the hotkey function. Hotkey: One of the <Alt>
keys in combination with the <Esc> key. When the
hotkey is pressed the HCMenu will be activated.
- WinBarInfo - The sreenbar always contains information about the
free memory. With this option this information may
be shown in the windowbar also.
- Local Snap - As already mentioned: the HCMenu uses two types of
snapshots. The "General" type is always used, while
the "Local" type is only used when this menuitem is
checkmarked. See also the next section.
- DoubleClick - People using WorkBench are used to doubleclick things.
Normally the HCMenu would start the same commands two
times when doubleclicked. When this item is checkmarked
HCMenu only reacts on items if they are doubleclicked.
- Colors - Activate one of the three pre-defined colorsets or just
reset the old colors. The latter was build in since
some tools changed my colors, something of which I don't
think to be neat.
- Prefs - Open the HCMenu-preferences window. With this window
some things may be altered. The window size (with a
minmum of 67) and the number of items per line. The
name of a logfile (no name will disable the logfile)
and the time-delay for the screenblanker. Also the name
of the editor may be specified. When reqtools.library
was found a fontrequester may be used to select the
font used for the itemnames.
Clicking "Okay" will activate the changes, "Cancel"
will discard every change made.
The two SnapShot's.
===================
As already mentioned: the HCMenu uses two different snapshots to store
the users preferences.
The first snapshot is the "General" snapshot. There is only one "General"
snapshot which contains general information of the HCMenu. Things as the
name of the menueditor, logfile, screenblanker, etc are stored in this
file.
When the item "Local Snap" in the prefs-menu is checkmarked the "Local"
snapshot is enabled. This "Local" snapshot contains information for one
specific menu only. Information like size, coordinations and colors are
stored in this file. Now it is possible to use different sizes for
different menus.
When the HCMenu can't find a "Local" snapshot belonging to a menufile,
it will use the information stored in the "General" snapshot. When the
"General" snapshot can't be found the "Default" information will be used.
The "General" Snapshot.
-----------------------
This snapshot is a binary file stored in the ENVARC: directory. This dir
is the standard KS2.0 directory for this kind of files. The name of the
file is "HCMenu.prefs", please don't change the file since the HCMenu
will refuse to load it properly! In the file the following information
(and the default) is stored:
Menu: S:Main.Menu
Items: 1 per line.
Width: 128 pixels.
x/y coord: x = 0 en y = 11.
Zip coord: x = 0 en y = 0.
Prefs: Drives quiet on
'*'=WildCard off
Borders on
Warnings on
ScreenBlanker off
SelectorBar on
Alt+Escape on
WinBarInfo off
Local Snap off
DoubleClick off
BlankTime: 5 minutes.
BlankFile: (None).
LogFile: (None).
Editor: Ed
FontName: Topaz
Fontheigth: 8
SubMenuColor: 1
ItemColor: 1
The "Local" SnapShot.
---------------------
The "Local" snapshot of a menu can always be found in the same directory
as the menufile. The snapshot will also carry the same name, but extended
with .snap.
The information in the "Local" snapshot: Position of the window, the size
of the window, number of items/line and the colornumbers for the item and
submenu colors.
ScreenBlanker.
==============
This topic is mentioned before and here I will describe the screenblanker
build in the HCMenu.
A screenblanker is a programm which observes the users input. When there
is no input from the user in a certain time, the screenblanker makes the
screen black. This is done to prevent the monitor for burin-in damage.
The duration of the time inwhich the lack of userinput :^) will activate
the blanker ,the "blanktime", may be specified by the user.
The screenblanker of the HCMenu uses both the mouse and the keyboard as
the sources for the "userinput". The blanktime may be spceified in the
prefs window (MenuBar->Prefs->Prefs...).
The standard menublanker in the HCMenu will use a black screen with one
blue, moving, bar. When the user moves the mouse, or the keyboard, the
screenblanker will be inactivated and the normal screen will be active
again.
The HCMenu screenblanker also allows the user to use other effects
during the blanking. When an other effect is used instead of the
standard effect, the name of the new effect should be specified in
the "Effect" stringgadget in the prefs window. When the standard effect
should be used, please clear the gadget. (Activate it by clicking and
press RightAmiga-X). When the effect could not by found the user will
be notified directly and the standard effect will be used.
Some additional rules for programming external blankereffects:
- When executed, it should start rightaway. No requesters or
other user-interactions should be needed.
- When the user starts the input again the effect should stop
immediately. Waiting for the LeftMouseButton only is never
enaugh!
- Use as less processortime as possible!
- Use re-intrant code! The effect will be loaded once and
executed every time it is needed! WARNING: Crunched code
NEVER is reintrant!
History.
========
A short impression in the live of a programm...
new in 1.8:
- Two different snapshots: General/Local. The latter is new.
- Borders around the prefswindow gadgets.
- Wildstar/DoubleClick/WinBarInfo in PrefsMenu.
1.7 - Fonts userdefined. KS2.0 zoomgadged instead of sleepGadget.
1.6 - SelectorBar. Alt+Escape. KS3.0 compatible colorreset.
1.5 - The prefsmenu is born. Using snapshot. ScreenBlanker.
1.4 - Menu gets on top when activated. Code very optimized.
1.3 - Adaptions for KS2.0. Using shell instead of the CLI.
1.2 - SubMenus. Color resetting.
1.1 - CLI-detach routine. Lightsourced items from the lefttop.
1.0 - 6 Gadgets in a row in a 640 pixels window.
Thanks.
=======
From this place I like to thank M. de Reuver for his beta-testing, bug-
reports and useful suggestions. His remarks made the HCMenu more user
friendly at several places.
Also I like to thank both M. van Aalten and M. Blomsma for their ideas
about how a menu should work.
Further I like to thank Michael Sinz for upgrading the Enforcer. It
helped me to remove some nasty things which I would never have found
without the help of Enforcer.
Blablabla.
==========
All versions of the Haute-Cuisine Menu (including the former ETOMenu
versions) are "cardware". This means that they may be copied under
certain circumstances only.
These circumstances are:
- There will be no profit gained for the copying, but a nominal
fee for the media may be charged.
- The complete archive is distributed without any changes.
- You (as the one who copied this product) send me a postcard
telling me that you use the software...
The copyrights for the HCMenu and it's documents still belong to me,
the author of both the software and the documents. I cannot be held
responsible for anything bad or good happening to you after copying
and using this product.
If you like to get a new version (when finished) with E-Mail, just
E-mail me, but please note your current version of the HCMenu.
For bugreports, ideas, questions and your postcard, I'm available at:
E-Mail: eto@icns.nl
WWW: http://www.icns.nl/users/eto
Ing. E. Th. van den Oosterkamp
Vijverstraat 11
4103 XX Culemborg
Nederland.
Thanks for watching, but now something completely different: